package com.rogereis.sisvendas.business;

import javax.inject.Inject;

import br.gov.frameworkdemoiselle.message.MessageContext;
import br.gov.frameworkdemoiselle.stereotype.BusinessController;
import br.gov.frameworkdemoiselle.template.DelegateCrud;

import com.rogereis.sisvendas.domain.Cliente;
import com.rogereis.sisvendas.message.InfoMessages;
import com.rogereis.sisvendas.persistence.ClienteDAO;

@BusinessController
public class ClienteBC extends DelegateCrud<Cliente, Integer, ClienteDAO> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Inject

	private MessageContext messageContext;
	
	@Override

	public void insert(Cliente cliente) {

	    super.insert(cliente);

	    messageContext.add(InfoMessages.CLIENTE_INSERT_OK, cliente.getNome());

	}
}
